#include <iostream>
#include <fstream>
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <numeric>
#include <vector>
#include <set>
#include <iterator>
#include <functional>
#include <boost/bind.hpp>
#include <boost/foreach.hpp>
#include <boost/timer.hpp>
#include <boost/shared_ptr.hpp>

using namespace std;

struct AddInSet{
	set<string>* st;
	AddInSet(set<string>* ps):st(ps){}
	void operator()(string s){
		st->insert(s);
	}
};

int main(int argc, char** argv){
	if(argc == 1){
	   cout<<"cmd file"<<endl;
	   exit(1);
	}
	ifstream file(argv[1]);
	istream_iterator<string> in(file),endf;
	set<string> S;
	for_each( in, endf, AddInSet(&S));
	cout<<S.size()<<endl;
	return 0;
}
